package com.bestcem.xm.member.grpc.service.param.extendfield;

import com.bestcem.xm.common.core.constant.RegTypes;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author ming.xue <ming.xue@idiaoyan.com>
 * @desc 扩展字段参数
 * @date 2021-06-16
 */
@Getter
@Setter
@NoArgsConstructor
public class ExtendFieldValueParam {
    /**
     * 扩展字段标识
     */
    @NotBlank(message = "扩展字段标识不能为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "扩展字段标识格式错误")
    private String id;

    /**
     * 名称
     */
    @NotBlank(message = "扩展字段名称不能为空")
    private String name;

    /**
     * 类型
     */
    @NotNull(message = "扩展字段类型不能为空")
    private Integer type;

    /**
     * 值
     */
    private Object value;
}
